#include"Udp_Server.hpp"
#include "comm.hpp"
#include <memory>
using namespace std;

void Usage(std::string proc)
{
    std::cout << "Usage : \n\t" << proc << " local_port\n" << std::endl;
}

// ./udp_server 8888
int main(int argc, char *argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
        return Usage_Err;
    }

    // std::string ip = argv[1];
    uint16_t port = std::stoi(argv[1]);
    std::unique_ptr<Udp_server> usvr = std::make_unique<Udp_server>(port);
    usvr->init();
    usvr->start();

    return 0;
}